{include file=member.header.html}
<!-- 内容 -->
<div class="content f-cb">
	<!-- 当前位置 -->
	{include file=path.html}
	<!-- 内容左边栏 -->
	{include file=member.menu.html}
	<!-- 内容右边栏 -->
	<script type="text/javascript" src="{res file=js/logistics.js}"></script>
	<script type="text/javascript">
	$(function() {
	    regionInit("region");
	    $('#shipping_form').validate({
	        errorLabelContainer: $('#warning'),
	        invalidHandler: function(form, validator) {
	            var errors = validator.numberOfInvalids();
	            if (errors) {
	                $('#warning').show();
	            } else {
	                $('#warning').hide();
	            }
	        },
	        onkeyup: false,
	        rules: {
	            shipping_name: {
	                required: true
	            },
	            region_id: {
	                required: true,
	                min: 1
	            },
	            sendjs: {
	                required: true,
	                number: true,
	                min: 1
	            },
	            sendy: {
	                required: true,
	                number: true
	            },
	            sendj: {
	                required: true,
	                number: true,
	                min: 1
	            },
	            sendyt: {
	                required: true,
	                number: true
	            }
	        },
	        messages: {
	            shipping_name: {
	                required: '{$lang.name_not_null}.'
	            },
	            region_id: {
	                required: '发货地不能为空. ',
	                min: '发货地不能为空. '

	            },
	            sendjs: {
	                required: '不能为空.',
	                number: '{$lang.number_only}',
	                min: '输入值不能小于1'
	            },
	            sendy: {
	                required: '不能为空.',
	                number: '{$lang.number_only}'
	            },
	            sendj: {
	                required: '不能为空.',
	                number: '{$lang.number_only}',
	                min: '输入值不能小于1'
	            },
	            sendyt: {
	                required: '不能为空.',
	                number: '{$lang.number_only}'
	            }
	        }
	    });
	});
	</script>
	<div class="con-logistics-r">
		<dl class="logistics-template">
			<dt>新建运费模板</dt>
			<dd>
				<div id="warning"></div>
				<form action="index.php?app=my_shipping&amp;act={$smarty.get.act}" method="post" class="" id="shipping_form" name="logistics_frm">
					<table width="100%">
						<tr>
							<td align="right" width="80"> <i>*</i>
								模板名称：
							</td>
							<td>
								<div class="valid-d">
									<input type="text" name="shipping_name" class="logistics-t-ia b-radius" />
								</div>
							</td>
						</tr>
						<tr>
							<td align="right"> <i>*</i>
								发货地：
							</td>
							<td>
								<div class="valid-d" id="region">
									<input type="hidden" name="region_id" value="" id="region_id" class="mls_id" />
									<input type="hidden" name="region_name" value="" class="mls_names" />
									<select>
										<option>{$lang.select_pls}</option>
										{html_options options=$regions}
									</select>
								</div>
							</td>
						</tr>
						<tr>
							<td align="right">
								<i>*</i>
								计价方式：
							</td>
							<td>
								<input type="radio" name="sendType" value="0" checked class="logistics-temp-senda" id="logistics_senda" />
								<label for="logistics_senda">按件计价</label> 
								&nbsp;&nbsp;&nbsp;&nbsp;
								<input type="radio" name="sendType" value="1" class="logistics-temp-sendb" id="logistics_sendb" />
								<label for="logistics_sendb">按重量计价</label>
							</td>
						</tr>
						<tr>
							<td align="right">&nbsp;</td>
							<td id="logistics-temp-td">
								默认运费： <b><input type="text" name="sendjs" class="logistics-t-ib b-radius" value="1" />
									件内,
									<input type="text" name="sendy" class="logistics-t-ib b-radius" />
									元 , 每增加
									<input type="text" name="sendj" class="logistics-t-ib b-radius" value="1" />
									件，增加运费
									<input type="text" name="sendyt" class="logistics-t-ib b-radius"/></b> 
								元
							</td>
						</tr>
						<tr>
							<td>&nbsp;</td>
							<td>
								<span>（除指定地区外，其余地区的运费采用"默认运费"）</span>
							</td>
						</tr>
						<tr id="logistics-diy"></tr>
						<tr>
							<td>&nbsp;</td>
							<td>
								<a id="logistics-temp-aa">指定地区设置运费</a>
							</td>
						</tr>
						<tr>
							<td>&nbsp;</td>
							<td>
								<input type="submit" class="logistics-temp b-radius" value="保存" />
								&nbsp;&nbsp;&nbsp;&nbsp;
								<input type="reset" class="logistics-temp b-radius" value="取消" />
							</td>
						</tr>
					</table>
				</form>
			</dd>
		</dl>
	</div>
</div>
<ul class="back-to-top">
	<li class="top-touch">&#xe6c3;</li>
</ul>
<div id="wlconfirmPop">
	<ul class="wlconfirmPop-t f-cb">
		<li class="wcp-l">提示</li>
		<li class="wcp-r">
			<a id="wlconfirmPop-close">X</a>
		</li>
	</ul>
	<p>
		<span>确定吗？</span>
	</p>
	<ul class="wlconfirmPop-btn f-cb">
		<li>
			<a class="b-radius" id="wlconfirmPop-cancel">取消</a>
		</li>
		<li>
			<a class="b-radius" id="wlconfirmPop-yes">确定</a>
		</li>
	</ul>
</div>
<div class="region-wrapper" id="logistics-popup">
	<div class="r-h">
		<h4 class="t">为指定地区设置运费</h4>
		<a class="close" id="logistics-popup-close">×</a>
	</div>
	<div class="r-b">
		<div class="cont">
			<p>红色文字表示在其他指定地区中有勾选，再次勾选会更新之前该省份的设置。</p>
			<ul id="pop_check_wrap">
				<li>
					<dl class="f-cb">
						<dt>
							<input type="checkbox" id="r-jzh" class="reg">
							<label for="r-jzh" class="reg-label">江浙沪</label>
						</dt>
						<dd>
							<input type="checkbox" id="r-25" class="prov">
							<label for="r-25" class="red">上海市</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-31" class="prov">
							<label for="r-31" class="red">浙江省</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-16" class="prov">
							<label for="r-16" class="red">江苏省</label>
						</dd>
						<div class="c"></div>
					</dl>
				</li>
				<li>
					<dl class="f-cb">
						<dt>
							<input type="checkbox" id="r-hd" class="reg">
							<label for="r-hd" class="reg-label">华东</label>
						</dt>
						<dd>
							<input type="checkbox" id="r-4" class="prov">
							<label for="r-4">福建省</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-3" class="prov">
							<label for="r-3">安徽省</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-22" class="prov">
							<label for="r-22">山东省</label>
						</dd>
						<div class="c"></div>
					</dl>
				</li>
				<li>
					<dl class="f-cb">
						<dt>
							<input type="checkbox" id="r-hn" class="reg">
							<label for="r-hn" class="reg-label">华南</label>
						</dt>
						<dd>
							<input type="checkbox" id="r-6" class="prov">
							<label for="r-6">广东省</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-7" class="prov">
							<label for="r-7">广西</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-9" class="prov">
							<label for="r-9">海南省</label>
						</dd>
						<div class="c"></div>
					</dl>
				</li>
				<li>
					<dl class="f-cb">
						<dt>
							<input type="checkbox" id="r-hz" class="reg">
							<label for="r-hz" class="reg-label">华中</label>
						</dt>
						<dd>
							<input type="checkbox" id="r-17" class="prov">
							<label for="r-17">江西省</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-11" class="prov">
							<label for="r-11">河南省</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-13" class="prov">
							<label for="r-13">湖北省</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-14" class="prov">
							<label for="r-14">湖南省</label>
						</dd>
						<div class="c"></div>
					</dl>
				</li>
				<li>
					<dl class="f-cb">
						<dt>
							<input type="checkbox" id="r-hb" class="reg">
							<label for="r-hb" class="reg-label">华北</label>
						</dt>
						<dd>
							<input type="checkbox" id="r-2" class="prov">
							<label for="r-2">北京市</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-27" class="prov">
							<label for="r-27">天津市</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-10" class="prov">
							<label for="r-10">河北省</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-23" class="prov">
							<label for="r-23">山西省</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-19" class="prov">
							<label for="r-19">内蒙古</label>
						</dd>
						<div class="c"></div>
					</dl>
				</li>
				<li>
					<dl class="f-cb">
						<dt>
							<input type="checkbox" id="r-db" class="reg">
							<label for="r-db" class="reg-label">东北</label>
						</dt>
						<dd>
							<input type="checkbox" id="r-18" class="prov">
							<label for="r-18">辽宁省</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-15" class="prov">
							<label for="r-15">吉林省</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-12" class="prov">
							<label for="r-12">黑龙江省</label>
						</dd>
						<div class="c"></div>
					</dl>
				</li>
				<li>
					<dl class="f-cb">
						<dt>
							<input type="checkbox" id="r-xb" class="reg">
							<label for="r-xb" class="reg-label">西北</label>
						</dt>
						<dd>
							<input type="checkbox" id="r-24" class="prov">
							<label for="r-24">陕西省</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-5" class="prov">
							<label for="r-5">甘肃省</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-21" class="prov">
							<label for="r-21">青海省</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-20" class="prov">
							<label for="r-20">宁夏</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-29" class="prov">
							<label for="r-29">新疆</label>
						</dd>
						<div class="c"></div>
					</dl>
				</li>
				<li>
					<dl class="f-cb">
						<dt>
							<input type="checkbox" id="r-xn" class="reg">
							<label for="r-xn" class="reg-label">西南</label>
						</dt>
						<dd>
							<input type="checkbox" id="r-32" class="prov">
							<label for="r-32">重庆市</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-26" class="prov">
							<label for="r-26">四川省</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-8" class="prov">
							<label for="r-8">贵州省</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-30" class="prov">
							<label for="r-30">云南省</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-28" class="prov">
							<label for="r-28">西藏</label>
						</dd>
						<div class="c"></div>
					</dl>
				</li>
				<li>
					<dl class="f-cb">
						<dt>
							<input type="checkbox" id="r-gat" class="reg">
							<label for="r-gat" class="reg-label">港澳台</label>
						</dt>
						<dd>
							<input type="checkbox" id="r-35" class="prov">
							<label for="r-35">台湾省</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-33" class="prov">
							<label for="r-33">香港</label>
						</dd>
						<dd>
							<input type="checkbox" id="r-34" class="prov">
							<label for="r-34">澳门</label>
						</dd>
						<div class="c"></div>
					</dl>
				</li>
			</ul>
		</div>
		<div class="o">
			<a href="javascript:;" class="button" id="logistics-popup-yes">保存</a>

			<a href="javascript:;" class="button" id="logistics-popup-cancel">取消</a>
		</div>
		<span id="tip">
			红色文字表示在其他指定地区中有勾选，
			<br>再次勾选会更新之前该省份的设置</span>
	</div>
</div>
<!-- 页脚 -->
<!-- 页脚 -->
{include file=footer.html}